package com.angcyo.javafx.ui

import javafx.event.EventHandler
import javafx.scene.input.MouseEvent

/**
 * Email:angcyo@126.com
 * @author angcyo
 * @date 2021/01/15
 */
open class DoubleWrapEventHandler(
    val oldClickHandle: EventHandler<in MouseEvent>? = null,
    delay: Long = 300,
    action: (MouseEvent) -> Unit
) : DoubleEventHandler(delay, action) {
    override fun handle(event: MouseEvent) {
        if (oldClickHandle is DoubleEventHandler) {
            //filter
        } else {
            oldClickHandle?.handle(event)
        }
        super.handle(event)
    }
}